<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8" />
		<title>文件下载</title>
		<link rel="stylesheet" href="../../plugin/layui/css/layui.css" />
		<link rel="stylesheet" type="text/css" href="../../css/utils.css" />
		<link rel="stylesheet" type="text/css" href="../../css/index.css" />
		<script src="../../plugin/layui/layui.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../plugin/jquery-3.2.1.min.js" type="text/javascript" charset="utf-8"></script>
		<style type="text/css">
			.service {
				padding-bottom: 30px;
				min-height: 500px;
			}
			
			.service-list-container {
				padding-top: 30px;
				background: #fff;
			}
			
			.service-list a {
				line-height: 25px;
				margin-left: 15px;
				border-bottom: 1px solid;
			}
			
			.service-list span {
				padding-left: 100px;
				color: #777;
			}
		</style>
	</head>

	<body>
		<div class="layui-fluid">
			<div class="layui-row header-row">

			</div>
			<div class="service">
				<div class="pageBg">
					<div class="pageBg2">
						<div class="pageBg3">
							<h3>服务说明</h3>
							<p>Service Description</p>
						</div>
					</div>
				</div>
				
				<div class="service-list-container limit-width">
					<h2 class="page-title">文件下载</h2>
					<table class="layui-table  limit-width" lay-even lay-skin="nob">
						<colgroup>
							<col width="150">
							<col>
							<col width="200">
						</colgroup>
						<thead>
							<tr>
								<th>序号</th>
								<th>下载内容</th>
								<th>创建时间</th>
							</tr>
						</thead>
						<tbody class="service-list">

						</tbody>
					</table>
				</div>

			</div>

			<div class="footer-nav">

			</div>

	</body>
	<script src="../../utils/api/index.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../utils/common/index.js" type="text/javascript" charset="utf-8"></script>

</html>
<script type="text/javascript">
	layui.use('laypage', function() {
		var laypage = layui.laypage;
		$.post(requestUrl.baseUrl + '/' + requestUrl.apiUrl.getImage, {
			'recordId': 1,
			'attachType': 'DOWNLOAD_FILE'
		}, function(data) {
			if(data.code == 0) {
				var list = data.list;
				for(var i = 0; i < list.length; i++) {
					var index = i+1;
					var url = list[i].url;
					var remake = list[i].remark
					var createTime = list[i].createTime
					$('.service-list').append('<tr>' +
							'<td>' + index + '</td>' +
							'<td><a href="'+ url +'" download="'+ remake +'.pdf">'+ remake +'</a></td>' +
							'<td>' + createTime + '</td>' +
							'</tr>')
				}

			}
		})

	});
</script>